package com.dubbo.consumer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.common.entity.MyResponse;
import com.dubbo.api.service.Provider2Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/provider")
public class Provider2Controller {

    @Reference
    Provider2Service provider2Service;

    @GetMapping("/provider2")
    public MyResponse provider(){
        return new MyResponse().success().data(provider2Service.provider()).message("");
    }
}
